package com.shiyi.constants;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Email;
import java.util.List;

/**
 * 支持批量导入、支持数据校验、支持松散绑定（下划线自动转换驼峰）
 * @author qiu
 * @date 2021-03-04 下午 11:16
 * @since 1.0
 */
@Data
@Component
@Validated
@ConfigurationProperties(prefix = "constant-properties")
public class PropertiesConstant {
    private String pName;
    private int age;
    private String gender;
    private List<String> likes;
    @Email
    private String email;
}
